package com.msite.mapper;

import com.msite.config.dbrepos.MyBatisRepository;
import com.msite.model.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@MyBatisRepository
public interface SysMenuMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysMenu record);

    int insertSelective(SysMenu record);

    SysMenu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysMenu record);

    int updateByPrimaryKey(SysMenu record);

    /**
     * 根据{管理员userId}，菜单pid 查询该用户对应的菜单列表数据
     * @param userId
     * @param pid {null}
     * @return
     */
    List<SysMenu> selectSysMenuByUserId(@Param("userId")Long userId, @Param("pid")Long pid);

}